<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

namespace core\lib;
use core\lib\config;
/**
 * Description of log
 *
 * @author gangguo
 */
class log {
    //put your code here
    static public $class = NULL;


    static public function init(){
        $dirve = config::get('DRIVE','log');
        $class = '\core\lib\drive\log\\'.$dirve;
        self::$class = new $class;
    }
            
    static public function log($message,$file = NULL){
        if(is_null($file)){
            $file = date('Ymd');
        }
        self::$class->log($message,$file);
    }
    
}
